namespace ScrumSprintMonitor.UI.Wpf
{
	#region #using Directives

    using System;
    using System.Diagnostics;

	using Infrastructure.Configuration;

    using PreEmptive.Attributes;

    #endregion

	public class ShellLayoutConfiguration : IShellLayoutConfiguration
	{
		private readonly SprintMode activeSprintMode;
		private readonly bool multiMonitor;
		private readonly bool runningAsScreensaver;
		private readonly bool showBurndownChart;

		public ShellLayoutConfiguration(bool multiMonitor, bool runningAsScreensaver, bool showBurndownChart, SprintMode activeSprintMode)
		{
			this.multiMonitor = multiMonitor;
			this.showBurndownChart = showBurndownChart;
			this.activeSprintMode = activeSprintMode;
			this.runningAsScreensaver = runningAsScreensaver;

            if (multiMonitor)
            {
                if (runningAsScreensaver)
                {
                    ReportScreenSaverWithSecondMonitor();
                }    
                else
                {
                    ReportSecondMonitor();
                }
            }
            else
            {
                ReportSingleMonitor();
            }

            if (showBurndownChart)
            {
                ReportBurndownChartShown();
            }
		    switch (activeSprintMode)
		    {
		        case SprintMode.Sprinting:
		            ReportSprintingMode();
		            break;
		        case SprintMode.Planning:
		            ReportPlanningMode();
		            break;
		    }
		}

        [Feature("Second monitor on screensaver")]
        private static void ReportScreenSaverWithSecondMonitor()
	    {
	    }

	    [Feature("Single monitor")]
        private static void ReportSingleMonitor()
        {
        }

        [Feature("Second monitor")]
        private static void ReportSecondMonitor()
        {
        }

        [Feature("Sprint mode - Planning")]
        private static void ReportPlanningMode()
	    {
	    }

        [Feature("Sprint mode - Sprinting")]
        private static void ReportSprintingMode()
	    {
	    }

	    [Feature("Sprint burndown chart")]
	    private static void ReportBurndownChartShown()
	    {
	    }

	    #region Implementation of IShellLayoutConfiguration

		public bool MultiMonitor
		{
			[DebuggerStepThrough]
			get { return this.multiMonitor; }
		}

		public bool RunningAsScreensaver
		{
			[DebuggerStepThrough]
			get { return this.runningAsScreensaver; }
		}

		public bool ShowBurndownChart
		{
			[DebuggerStepThrough]
			get { return this.showBurndownChart; }
		}

		public SprintMode ActiveSprintMode
		{
			[DebuggerStepThrough]
			get { return this.activeSprintMode; }
		}

		#endregion
	}
}